package com.boot.unity.api.wx.controller;


import com.boot.unity.api.wx.entity.TrainCoachEval;
import com.boot.unity.api.wx.service.WxCoachEvalService;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 教练评价
 */
@RestController
@RequestMapping("/wx/coachEval")
@Validated
public class WxCoachEvalController {
    private final Log logger = LogFactory.getLog(WxCoachEvalController.class);
    @Autowired
    private WxCoachEvalService wxCoachEvalService;


    /**
     * 教练助手
     * 评价星级
     * @return
     */
    @GetMapping("evalInfo")
    public Object evalInfo(String uid,String key) {
        return wxCoachEvalService.evalInfo(uid,key);
    }

    /**
     * 评价教练
     *
     * @param coachEval
     * @return
     */
    @PostMapping("save")
    public Object save(@RequestBody TrainCoachEval coachEval) {
        return wxCoachEvalService.save(coachEval);

    }





}
